Skip to content

Add PUT /users/:id (update a user) - #84

Open
Bohdan-Maksymiuk wants to merge 3 commits into
mate-academy:mainfrom
Bohdan-Maksymiuk:feat/update-user
Open

Add PUT /users/:id (update a user)#84
Bohdan-Maksymiuk wants to merge 3 commits into
mate-academy:mainfrom
Bohdan-Maksymiuk:feat/update-user

Conversation

@Bohdan-Maksymiuk

Copy link
Copy Markdown

Summary

  • Add updateUser(id, {name, email}) to db/store.js
  • Add PUT /users/:id in routes/users.js: validates name/email are present (400), returns 404 for an unknown id, otherwise updates and returns the user (200)
  • Fill in NOTES.md per the project's grading checklist

Test plan

  • npm test — 9/9 passing, including all three tests/update-user.test.js cases (update, 404, 400)
  • npm run lint — clean
  • Manual check: PUT /users/1 with a partial body returns 400; PUT /users/9999 with a full body returns 404; PUT /users/1 with a full body returns 200 with the updated user

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant